package org.fas.media
{
	import flash.media.Sound;
	import flash.media.SoundChannel;
	import flash.media.SoundTransform;
	import flash.net.URLRequest;

	public class FSound extends Sound
	{
		private var urlLoading:String;
		private var soundChannel:SoundChannel;
		public function FSound(_url:String='')
		{
			if(_url){
				this.loadIn(_url);
			}
		}
//		override public function load(stream:URLRequest, context:SoundLoaderContext=null):void{
//			throw(new Event('Removed Function'));
//		}
		public function loadIn(_url:String):void{
			this.urlLoading = _url;
			var _reg:URLRequest = new URLRequest(_url);
			super.load(_reg);
		}
		override public function play(startTime:Number=0, loops:int=0, sndTransform:SoundTransform=null):SoundChannel{
			this.soundChannel = super.play(startTime, loops, sndTransform);
			return this.soundChannel;
		}
		public function stop():void{
			if(this.soundChannel){
				this.soundChannel.stop();
			}
		}
	}
}